GXGetColorSet
You can use theGXGetColorSet
function to retrieve the color values from a color set object.
long GXGetColorSet(gxColorSet source, gxColorSpace *space, gxSetColor colors[]);
source
- A reference to the color set object whose color values you want to retrieve.
space
- A pointer to a color space value. On return, specifies the color space for the source color set.
colors
- An array of
gxSetColor
color values. On return, contains the set of color values in the source color set.- function result
- The number of color values in the source color set.
DESCRIPTION
TheGXGetColorSet
function retrieves the color values from the source color set and returns them in thecolors
array. It also returns the color set's color space in the location pointed to by thespace
parameter. The function result is the number of colors returned in thecolors
array.Before calling GXGetColorSet, you must allocate an array of sufficient size to hold
the color-value array of the color set. If instead you passnil
for thecolors
parameter, the function does not return any color values, but nonetheless returns (as its function result) the number of colors in the color set. Thus you can make an initial call toGXGetColorSet
to determine the size of the array to allocate, and then call it once more to get the color values themselves.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory colorSet_is_nil SEE ALSO
To replace the entire array of color values in a color set object, use theGXSetColorSet
function, described in the next section. To retrieve some of the color values in a color set object, use theGXGetColorSetParts
function, described on page 4-75. To replace some of the color values in a color set object, use theGXSetColorSetParts
function, described on page 4-76.The
gxSetColor
union is described on page 4-56.